package com.onpositive.dataminer.rcp.views;

import com.onpositive.dataminer.core.DefaultUniverse;
import com.onpositive.dataminer.core.HasEnoughData;
import com.onpositive.knowledge.model.value.audits.IAuditManager;
import com.onpositive.semantic.model.api.property.IProperty;
import com.onpositive.semantic.model.binding.Binding;

public class AuditManagerView extends PropertyView {

	public AuditManagerView() {
		super("ui/auditManagerView.dlf");
		setSelectionProvider("transformersTable");
	}
		
//	@SuppressWarnings("rawtypes")
//	@Override
//	protected Object transform(Object value) {
//		IProperty p = (IProperty) value;
//		
//		return null;
//	}

	public IAuditManager getAuditManager() {
		return DefaultUniverse.getInstance().getAuditManager() ;
	}
	
	HasEnoughData dtt = DefaultUniverse.getInstance()
			.getEnoughDataAuditResult();
	
	public void doAudit() {
		DefaultUniverse.getInstance().launchAudit();
		dtt = DefaultUniverse.getInstance().getEnoughDataAuditResult();
		// getBinding().refresh(true);
		((Binding) getBinding().getBinding("view")).refresh(true);
	}
}
